home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
a-g
/
ami2d
/
macros
/
genline.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1978-11-24
|
739b
|
40 lines
/* script to generate nodes between two existing nodes */
options results
address ami2d
if ~show('l', "rexxmathlib.library") then do
check = addlib('rexxmathlib.library',0,-30,0)
end
'info(node)'
f1 = result
parse var f1 nd i1a x1a y1a
if i1a = 0 then exit
'info(node)'
f2 = result
parse var f2 nd i1b x1b y1b
if i1b = 0 then exit
if i1a > i1b then do
parse var f2 nd i1a x1a y1a
parse var f1 nd i1b x1b y1b
end
in = i1b - i1a
'get inodes'
if length(result) > 0 then ni = result%1 - 1
else ni = in
'set inodes 'ni + 1
'get igrad'
if length(result) > 0 then gi = result
else gi = 1
do i=0 to ni
n = i1a + i
xn = x1a + (x1b-x1a)*pow(i/ni,gi)
yn = y1a + (y1b-y1a)*pow(i/ni,gi)
'node('n','xn','yn')'
end
exit